Skip to content

Make sure we install FrameworkExtra bundle and not just doctrine/annotations #14387

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 11, 2020

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Oct 11, 2020

This PR will fix #14203 and revert #14198

@javiereguiluz wrote:

There was a package called annotations-pack (see https://packagist.org/packages/symfony/annotations-pack) which allowed to run composer require annotations (when using Symfony Flex)

This is true. The pack was removed. Currently there is a flex alias to install SensioFrameworkExtraBundle when one run composer require annotations. That will make sure to install SensioFrameworkExtraBundle and doctrine/annotations.

One will always need SensioFrameworkExtraBundle to be able to use route config with annotations, only doctrine/annotations is not good enough.


People that is not using Flex will see the Could not find package annotations as @albuquerque53 saw.

@javiereguiluz
Copy link
Member

Thanks for fixing this. We usually avoid using Flex aliases because it's confusing for some people and doesn't work when not using Flex ... but I think we can make an exception here.

@javiereguiluz
Copy link
Member

Merged in 4.4 and up. Thanks Tobias!

@javiereguiluz javiereguiluz merged commit 5afc362 into symfony:4.4 Oct 11, 2020
@xabbuh
Copy link
Member

xabbuh commented Oct 13, 2020

One will always need SensioFrameworkExtraBundle to be able to use route config with annotations [...]

I am not sure I understand the reasoning here. We do not use the annotations provided by SensioFrameworkExtraBundle, but the @Route annotation from the Routing component, don't we?

@Nyholm
Copy link
Member Author

Nyholm commented Oct 13, 2020

Oh.. I know I tested this on a new 5.1 install and I didnt get it to work....

I tested it just now again and it was working.. You only need Route component and doctrine annotations to use routes with annotations.

I've update the docs here #14400 (but here is the "pure revert": #14399)

@Nyholm Nyholm deleted the annotations branch October 13, 2020 09:02
wouterj added a commit that referenced this pull request Oct 14, 2020
…. (Nyholm)

This PR was submitted for the 5.x branch but it was merged into the 4.4 branch instead.

Discussion
----------

You need doctrine/annotations for route annotation support.

For Symfony 4.4

This will correct the mistake in #14387

There is an alternative to this PR here: #14400

Commits
-------

6a74ba6 You need doctrine/annotations for route annotation support.
wouterj added a commit that referenced this pull request Oct 14, 2020
This PR was squashed before being merged into the 5.x branch.

Discussion
----------

[Routing] Better use of composer require

For Symfony 4.4

This will correct the mistake in #14387

If we still want to use the alias, please consider this PR: #14399

Commits
-------

41b7983 [Routing] Better use of composer require
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update annotations package installation
4 participants